import request from '@/utils/request'

// 报表组件 类型 新增
export function addType(data) {
  return request({
    url: '/system/reports/component/addType',
    method: 'post',
    data
  })
}

// 报表组件 类型 编辑
export function editType(data) {
  return request({
    url: '/system/reports/component/editType',
    method: 'post',
    data
  })
}

// 报表组件 类型 删除
export function removeType(data) {
  return request({
    url: '/system/reports/component/removeType',
    method: 'post',
    data
  })
}

// 报表组件 类型 删除 前校验
export function deleteCheckType(data) {
  return request({
    url: '/system/reports/component/deleteCheckType',
    method: 'post',
    data
  })
}

// 报表组件 类型 查询
export function queryType(data) {
  return request({
    url: '/system/reports/component/query',
    method: 'post',
    data
  })
}
//列表查询
export function queryPageList(params) {
  return request({
    url: '/system/reports/component/queryList',
    method: 'get',
    params
  })
}

// 编辑报表组件
export function editComponent(data) {
  return request({
    url: '/system/reports/component/edit',
    method: 'post',
    data
  })
}

// 编辑报表组件分类
export function editComponentType(data) {
  return request({
    url: '/system/reports/component/editComponentType',
    method: 'post',
    data
  })
}

// 编辑报表组件
export function addComponent(data) {
  return request({
    url: '/system/reports/component/add',
    method: 'post',
    data
  })
}


// 获取 报表组件 详情
export function getComponent(data) {
  return request({
    url: '/system/reports/component/getComponent',
    method: 'post',
    data
  })
}

// 删除 报表组件
export function deleteComponent(data) {
  return request({
    url: '/system/reports/component/remove',
    method: 'post',
    data
  })
}
// 删除数据前校验
export function deleteForCheck(data) {
  return request({
    url: '/system/reports/component/deleteCheck',
    method: 'post',
    data: data
  })
}
